package com.mycompany.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.mycompany.dao.EventDao;
import com.mycompany.model.Event;
import com.mycompany.service.EventManager;

@Service("eventManager")
public class EventManagerImpl implements EventManager {
	EventDao 	eventDao;

	@Resource
	public void setEventDao(EventDao eventDao) {
		this.eventDao = eventDao;
	}
	
	public List<Event> getEventList() {
		List<Event> events = eventDao.getEvents();
		
		return events;
	}	

	public Event saveEvent(Event event) {
		return eventDao.saveEvent(event);
	}

	public Event getEvent(Long id) {
		return eventDao.getEvent(id);
	}


}
